<template>
  <div>
    <button @click="login()">显示</button>
     <div v-for="i in 10" :key="i"  v-show="l"  > {{i}}</div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        l: false
      }
    },
    methods: {
      login() {
      this.l=!this.l
      }
    },
  }
</script>

<style lang="scss" scoped>

</style>